package com.mengtian_tech.tju.dataquery.api.util;


import tju.utils.EnvTool;

/**
 *
 * @author Administrator
 */
public class SystemConfig {

    //====For Debug paras start ========
    public static boolean DEBUG_WS = false;   //发布时应都改为false
    public static boolean IS_DEBUG = false;   //debug=true时直接登录为下面的用户
    public static String DEBUG_USER_ID = "116068";
    //====For Debug paras end ========
    
     

    public static String OA_WS_URL = "http://172.19.2.137/ws.rs.oa/service/";
    public static String AUTH_WS_URL = "http://172.19.2.137/ws.rs.auth/auth/";
    
    
    //加入静态模块，判断如果是开发机器，则修改debug=true，否则不要
    static {
    	if(EnvTool.isDevMode()) {
			 
			  AUTH_WS_URL = "http://localhost:8088/ws.rs.auth/auth/"; 
			  OA_WS_URL ="http://localhost:8088/ws.rs.oa/service/";
			  DEBUG_WS = true;
    		IS_DEBUG = true;
    	}
    	
    	System.out.println("config loading, IS_DEBUG" + IS_DEBUG);
    	System.out.println("config loading, OA_WS_URL" + OA_WS_URL);
    }
    
    public static Long SYS_ID = 1L;
    public static String SYS_NAME = "portal.oa";
    public static String PASSWORD = "tjumic4404";
    
    public static String FTP_USER = "oa_workflow";
    public static String FTP_PASSWD = "tjumic4404workflow";
    public static String FTP_DIR = "oafile/workflow/";
    
    
    public static String SMS_USER = "tjumic";
    public static String SMS_PASSWD = "tjumic123";
    public static String SMS_SENDER = "【天大办公平台】";
    
    //signet
    public static final String SIGNET_SYSTEM_ID = "o1";
    
    private static String ATTA_PATH_LINUX = "/app/atta/workflow/";
    private static String ATTA_PATH_WINDOWS = "d:\\atta\\workflow\\";
    public static String ALL_COLLEGE_ROLE = "college_head";
    public static String ALL_GROUP = "G;";
    public static String TEST_CELL_PHONE = "18502223516";
    
    public static String getAttaPath(){
        String osName = System.getProperty("os.name");
        if (osName.contains("Window")){
            return ATTA_PATH_WINDOWS;
        }else{
            return ATTA_PATH_LINUX;
        }
    }
    
    public static String getOaWsUrl(){
    	
        if (DEBUG_WS){
        	return "http://localhost:8088/ws.rs.oa/service/";
        }else{
            return "http://172.19.2.137/ws.rs.oa/service/";
        }
    }
    
    
}
